<?php #//AJAX PHP PENNY AUCTION v.1.3

#///////////////////////////////////////////////////////////
#//  COPYRIGHT 2009 Aaron Helmlinger ALL RIGHTS RESERVED  //
#///////////////////////////////////////////////////////////
include "../includes/config.inc.php";
include "loggedin.inc.php";
                               
          if($_POST[update])  {

       
       $tax_rate1 = $_POST[tax_rate];
         $nat_tax_rate1 = $_POST[nat_tax_rate];   
         $tax_state1 = $_POST[tax_state];                   
    
$query2="UPDATE PHPAUCTIONXL_version_1_3 SET tax_rate_percentage='$tax_rate1' WHERE id='1'";
       
mysql_query($query2);



$query2="UPDATE PHPAUCTIONXL_version_2_1 SET nat_tax_rate='$nat_tax_rate1' WHERE id='1'";
       
mysql_query($query2);

$query2="UPDATE PHPAUCTIONXL_version_2_1 SET tax_state='$tax_state1' WHERE id='1'";
       
mysql_query($query2);

         }     
       
         $query_settings = "select * from PHPAUCTIONXL_version_1_3 where id='1'";
                             $query_settings2 =  mysql_query ($query_settings);
                                $tax_rate2 = mysql_result($query_settings2,0,"tax_rate_percentage");
                              
                       $query_settings = "select * from PHPAUCTIONXL_version_2_1 where id='1'";
                             $query_settings2 =  mysql_query ($query_settings);
                                $nat_tax_rate2 = mysql_result($query_settings2,0,"nat_tax_rate");                             
                                 $tax_state2 = mysql_result($query_settings2,0,"tax_state"); 
    //  $ERR ="Note: Pausing auctions using this feature does not stop the clocks from counting down, it just allows the auction to display the word 'PAUSED' and disables the bid button.  Auctions can still end while being paused, so manage the auctions ending time to end after the paused duration is over.  To continually pause auction enter a '0' for pause start time and '23' for pause end time. Enter a '0' for both the start and end pause time, to activate the auctions countdown timer and never pause an auction."                          

  ?>
  






<HTML>
<HEAD>
<link rel='stylesheet' type='text/css' href='style.css' />
<link href="css/main.css" rel="stylesheet" type="text/css">
</HEAD>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">





<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr> 
    <td>
    
       <? // -------------------------- Admin Tool Heading --------------------------------------?>
       
       
    <table width="100%" border="0" cellspacing="0" cellpadding="0" class="titulo">
        <tr> 
<td class="icono"><img src="images/pref_icon.gif" width="28" height="28"></td>
          <td class="breadcrumbs"><p><span><?=$MSG_25_0008?></span>&nbsp;&gt;&gt;&nbsp;<? print $MSG_AJAX_ADMIN_TAX_RATE_TITLE; ?></p></td>
        </tr>
      </table>
      
      
      
      </td>
  </tr>
  <tr>
    <td align="center" valign="middle">&nbsp;</td>
  </tr>
    <tr> 
    <td align="center" valign="middle">
    
    
    
<TABLE BORDER=0 WIDTH=100% CELLPADDING=0 CELLSPACING=0 BGCOLOR="#FFFFFF">
<TR>
<TD align="center">
<BR>
<FORM NAME=conf ACTION=<?=basename($_SERVER['PHP_SELF'])?> METHOD=POST>


  <? // -------------------------- LIGHT BLUE TITLE BAR --------------------------------------?>

	<TABLE WIDTH="95%" BORDER="0" CELLSPACING="0" CELLPADDING="0"  class="base" ALIGN="CENTER" style="border:1px solid #ccc;">
		<TR>
			<TD ALIGN=CENTER class=title>
				<p><? print $MSG_AJAX_ADMIN_TAX_RATE_TITLE; ?></p>
			</TD>
		</TR>
		
		
		
		<TR>
		<TD>
		
    
    
    <TABLE WIDTH=100% ALIGN="CENTER" CELLPADDING=0 cellspacing="0" BGCOLOR="#FFFFFF">
		
 <? // -------------------------- ERROR BAR --------------------------------------?>    
 
 <? if ($ERR) { ?>   
    	<TR>
				<TD COLSPAN="2"  class="error"><B>
					<p><? print $ERR; ?></p>
					</B></TD>
			</TR>
	<? } ?>	
    
    	<TR>
			
			
 <? // -------------------------- WHITE BAR --------------------------------------?> 			
				<TD WIDTH="125"> 
				<p class="blue"><? print $MSG_AJAX_ADMIN_TAX_RATE_TITLE; ?></p>
					</TD>
				<TD WIDTH="405">
					<INPUT TYPE="text" NAME="tax_rate" SIZE="4" MAXLENGTH="4" VALUE="<? print $tax_rate2; ?>"> &nbsp;&nbsp;&nbsp;&nbsp;  <? print $MSG_AJAX_ADMIN_TAX_RATE_NOTE; ?>
					</TD>
			</TR>
			
		      	<TR>
			
			
 <? // -------------------------- WHITE BAR --------------------------------------?> 			
				<TD WIDTH="125" class="gris"> 
				<p class="blue"><? print $MSG_AJAX_ADMIN_NAT_TAX_RATE_TITLE; ?></p>
					</TD>
				<TD WIDTH="405" class="gris">
					<INPUT TYPE="text" NAME="nat_tax_rate" SIZE="4" MAXLENGTH="4" VALUE="<? print $nat_tax_rate2; ?>"> &nbsp;&nbsp;&nbsp;&nbsp;  <? print $MSG_AJAX_ADMIN_NAT_TAX_RATE_NOTE; ?>
					</TD>
			</TR>
			
			
      			<TD WIDTH="125"> 
				<p class="blue"><? print $MSG_AJAX_ADMIN_STATE_TAX_RATE_TITLE; ?></p>
					</TD>
				<TD WIDTH="405">
					<INPUT TYPE="text" NAME="tax_state" SIZE="4" MAXLENGTH="4" VALUE="<? print $tax_state2; ?>"> &nbsp;&nbsp;&nbsp;&nbsp;  <? print $MSG_AJAX_ADMIN_STATE_TAX_RATE_NOTE; ?>
					</TD>
			</TR>
			
		      	<TR>	
			
			
			</TABLE>
		
		  <INPUT TYPE=hidden NAME=update VALUE=1 >
		        <INPUT TYPE="submit" NAME="act" VALUE="Update Settings" class="action">
		 </form>
		
		</TD>
		</TR>
	</TABLE>
</TD>
</TR>
</TABLE>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>
